// Copyright (C) 2025 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

@import "../../../assets/theme";

.pf-node-explorer {
  border: 1px solid var(--pf-color-border);
  border-radius: 8px;
  background-color: var(--pf-color-background);
  height: 100%;
  display: flex;
  flex-direction: column;

  &__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem;
    border-bottom: 1px solid var(--pf-color-border);
  }

  article {
    padding: 0.375rem;
    font-size: 0.875rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  i.pf-node-explorer__warning-icon--error {
    color: var(--pf-color-danger);
  }

  i.pf-node-explorer__warning-icon--warning {
    color: var(--pf-color-warning);
  }
}

.pf-node-explorer-sql-source {
  article {
    padding: 0;
    border: none;
  }
}

.pf-exp-query-operations {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pf-exp-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--pf-color-border);
  border-radius: 8px;
}

.pf-exp-operations-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pf-exp-aggregations-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pf-exp-aggregation-editor {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pf-exp-aggregation-viewer {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  &:hover {
    background-color: var(--pf-color-hover);
  }
}
